A mock struct that always throws.
1 import std.exception : assertThrown; 2 import unit_threaded.should : UnitTestException; 3 4 auto m = throwStruct; 5 assertThrown!UnitTestException(m.foo); 6 assertThrown!UnitTestException(m.bar(1, "foo"));
See Implementation
A mock struct that always throws.